import request from "@/utils/request";
export function myAnnouncement() {
  return request({
    url: `/system/notice/myAnnouncement`,
    method: "get",
  });
}
// “阅读状态 -所有 1-已读 2-未读 “通知类型 1-通知 2-公告
export function getNotice() {
  return request({
    url: `/system/notice/myNotice`,
    method: "get",
  });
}
// 查询学校列表
export function listPost_notice(query) {
  return request({
    url: "/system/notice/list",
    method: "get",
    params: query,
  });
}
// 通知-修改已读状态
export function changeReadStatus(id) {
  return request({
    url: "/system/notice/changeReadStatus/" + id,
    method: "post",
  });
}

// 查询学校详细
export function getPost_notice(postId) {
  return request({
    url: "/system/notice/" + postId,
    method: "get",
  });
}


// 修改
export function updatePost_notice(data) {
  return request({
    url: "/system/notice",
    method: "put",
    data: data,
  });
}
// 修改发布状态
export function changePublishStatus(data) {
  return request({
    url: "/system/notice/changePublishStatus",
    method: "put",
    data: data,
  });
}
// 删除
export function delPost_notice(postId) {
  return request({
    url: "/system/notice/" + postId,
    method: "delete",
  });
}
// 添加
export function addPost_notice(data) {
  return request({
    url: "/system/notice",
    method: "post",
    data: data,
  });
}
